﻿var SolarSystem = function (angularSpeed, spinDirection, star, sizeAndPosition, name, children) {

    //Local Variables
    var _star = null;

    $.extend(this, new UniverseEntity(sizeAndPosition, name, children));

    this.AngularSpeed = angularSpeed;
    this.SpinDirection = spinDirection;
    this.UniverseEntityType = UniverseEntityTypes.SolarSystem;

    //Public Methods
    this.Star = function (star) {
        if (!star)
            return _star;

        _star = star;

        this.AddChild(star);
    };


    //Construct logic
    this.Star(star);
};